<?php

/*
 * jzp2008
 */

namespace app\mall\controller;
use think\Db;
use Util\Tree;

class GoodsCate{    
    /*
     * 广告输出
     */
    public function index() {
        
       $where['delete_time'] = 0; 
       $where['show'] = 1; 
        $cates = DB::name('goods_cate')->where($where)->order('orderby asc')->select();       
        $tree = new Tree('cate_id', 'parent_id');
        $tree->load($cates);
        return $cates;
        
        
    }

}
